package com.syerit.model
{
	import flash.events.Event;
	
	import mx.rpc.IResponder;
	
	import org.pranaframework.context.support.FlexXMLApplicationContext;
	import org.pranaframework.context.support.XMLApplicationContext;
	import org.puremvc.as3.multicore.interfaces.IProxy;
	import org.puremvc.as3.multicore.patterns.proxy.Proxy;

	public class ExternalProxy extends Proxy implements IProxy, IResponder
	{
		public static const NAME:String = "ExternalProxy";
		
		private var _appContext:XMLApplicationContext=new XMLApplicationContext("2008_11_24_N_EnterpriseModularApp2/data/config.xml");
		// this is called when the delegate receives a result from the service
	     public function load():void
	     {
	     	_appContext.addEventListener(Event.COMPLETE, onApplicationContextComplete);
         	_appContext.load();
         	trace("load data");
	     }
	     private function onApplicationContextComplete(e:Event):void
	     {
	     	trace("puk");
	     }
	     public function result( rpcEvent : Object ) : void
	     {
	
	     }
	        
	     // this is called when the delegate receives a fault from the service
	     public function fault( rpcEvent : Object ) : void 
	     {
	
	     }
	}
}